package models;

import java.util.*;


public class AppReward {
	
	private Map<String,AppPoint> points = new HashMap<String,AppPoint>();
	
	public List<Badge> badges = new ArrayList();
	
	public void addPoint(String key, AppPoint value){
		if(!points.containsKey(key)){
			points.put(key,value);
		}else{
			points.get(key).levelUp = value.levelUp;
			points.get(key).type = value.type;
			points.get(key).currentLevel = value.currentLevel;
			points.get(key).addValue(value.value);			
		}
	}
	
	public void setPointValue(String key, int value){
		if(points.containsKey(key)){
			System.out.println("setPointValue========"+value);
			points.get(key).addValue(value);
		}
	}
	
	
	public Map<String,AppPoint> getPoints(){
		return points;
	}
	
}

